import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/emergency/get_emergency_accident_info_entity.dart';

GetEmergencyAccidentInfoEntity $GetEmergencyAccidentInfoEntityFromJson(Map<String, dynamic> json) {
  final GetEmergencyAccidentInfoEntity getEmergencyAccidentInfoEntity = GetEmergencyAccidentInfoEntity();
  final String? accidentDescription = jsonConvert.convert<String>(json['accidentDescription']);
  if (accidentDescription != null) {
    getEmergencyAccidentInfoEntity.accidentDescription = accidentDescription;
  }
  final String? accidentFileUrl = jsonConvert.convert<String>(json['accidentFileUrl']);
  if (accidentFileUrl != null) {
    getEmergencyAccidentInfoEntity.accidentFileUrl = accidentFileUrl;
  }
  final String? accidentLevel = jsonConvert.convert<String>(json['accidentLevel']);
  if (accidentLevel != null) {
    getEmergencyAccidentInfoEntity.accidentLevel = accidentLevel;
  }
  final String? accidentLevelName = jsonConvert.convert<String>(json['accidentLevelName']);
  if (accidentLevelName != null) {
    getEmergencyAccidentInfoEntity.accidentLevelName = accidentLevelName;
  }
  final String? accidentLocation = jsonConvert.convert<String>(json['accidentLocation']);
  if (accidentLocation != null) {
    getEmergencyAccidentInfoEntity.accidentLocation = accidentLocation;
  }
  final String? accidentName = jsonConvert.convert<String>(json['accidentName']);
  if (accidentName != null) {
    getEmergencyAccidentInfoEntity.accidentName = accidentName;
  }
  final String? accidentSummary = jsonConvert.convert<String>(json['accidentSummary']);
  if (accidentSummary != null) {
    getEmergencyAccidentInfoEntity.accidentSummary = accidentSummary;
  }
  final String? accidentType = jsonConvert.convert<String>(json['accidentType']);
  if (accidentType != null) {
    getEmergencyAccidentInfoEntity.accidentType = accidentType;
  }
  final String? accidentTypeName = jsonConvert.convert<String>(json['accidentTypeName']);
  if (accidentTypeName != null) {
    getEmergencyAccidentInfoEntity.accidentTypeName = accidentTypeName;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    getEmergencyAccidentInfoEntity.companyCode = companyCode;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    getEmergencyAccidentInfoEntity.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    getEmergencyAccidentInfoEntity.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    getEmergencyAccidentInfoEntity.createDate = createDate;
  }
  final int? deathNum = jsonConvert.convert<int>(json['deathNum']);
  if (deathNum != null) {
    getEmergencyAccidentInfoEntity.deathNum = deathNum;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    getEmergencyAccidentInfoEntity.deleted = deleted;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    getEmergencyAccidentInfoEntity.id = id;
  }
  final String? occurrenceTime = jsonConvert.convert<String>(json['occurrenceTime']);
  if (occurrenceTime != null) {
    getEmergencyAccidentInfoEntity.occurrenceTime = occurrenceTime;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    getEmergencyAccidentInfoEntity.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    getEmergencyAccidentInfoEntity.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    getEmergencyAccidentInfoEntity.updateDate = updateDate;
  }
  return getEmergencyAccidentInfoEntity;
}

Map<String, dynamic> $GetEmergencyAccidentInfoEntityToJson(GetEmergencyAccidentInfoEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['accidentDescription'] = entity.accidentDescription;
  data['accidentFileUrl'] = entity.accidentFileUrl;
  data['accidentLevel'] = entity.accidentLevel;
  data['accidentLevelName'] = entity.accidentLevelName;
  data['accidentLocation'] = entity.accidentLocation;
  data['accidentName'] = entity.accidentName;
  data['accidentSummary'] = entity.accidentSummary;
  data['accidentType'] = entity.accidentType;
  data['accidentTypeName'] = entity.accidentTypeName;
  data['companyCode'] = entity.companyCode;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['deathNum'] = entity.deathNum;
  data['deleted'] = entity.deleted;
  data['id'] = entity.id;
  data['occurrenceTime'] = entity.occurrenceTime;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  return data;
}

extension GetEmergencyAccidentInfoEntityExtension on GetEmergencyAccidentInfoEntity {
  GetEmergencyAccidentInfoEntity copyWith({
    String? accidentDescription,
    String? accidentFileUrl,
    String? accidentLevel,
    String? accidentLevelName,
    String? accidentLocation,
    String? accidentName,
    String? accidentSummary,
    String? accidentType,
    String? accidentTypeName,
    String? companyCode,
    String? createBy,
    String? createById,
    String? createDate,
    int? deathNum,
    String? deleted,
    String? id,
    String? occurrenceTime,
    String? updateBy,
    String? updateById,
    String? updateDate,
  }) {
    return GetEmergencyAccidentInfoEntity()
      ..accidentDescription = accidentDescription ?? this.accidentDescription
      ..accidentFileUrl = accidentFileUrl ?? this.accidentFileUrl
      ..accidentLevel = accidentLevel ?? this.accidentLevel
      ..accidentLevelName = accidentLevelName ?? this.accidentLevelName
      ..accidentLocation = accidentLocation ?? this.accidentLocation
      ..accidentName = accidentName ?? this.accidentName
      ..accidentSummary = accidentSummary ?? this.accidentSummary
      ..accidentType = accidentType ?? this.accidentType
      ..accidentTypeName = accidentTypeName ?? this.accidentTypeName
      ..companyCode = companyCode ?? this.companyCode
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..deathNum = deathNum ?? this.deathNum
      ..deleted = deleted ?? this.deleted
      ..id = id ?? this.id
      ..occurrenceTime = occurrenceTime ?? this.occurrenceTime
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate;
  }
}
